/*年轻人，只管向前看，不要管自暴自弃者的话*/
package com.znb.okdown.ui.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter


/**
 * create by itz on 2024/1/17 10:01
 * desc :
 **/
class ViewPager2Adapter(
    private var fragmentActivity: FragmentActivity,
    private var fragmentList: List<Fragment>
) : FragmentStateAdapter(fragmentActivity) {
    override fun getItemCount(): Int {
        return fragmentList.size
    }

    override fun createFragment(position: Int): Fragment {
        return fragmentList[position]
    }
}